'use strict';

const Controller = require('egg').Controller;

class UserController extends Controller {
  async create() {
    // 创建用户的方法
    const {ctx, service} = this;
    const payload = ctx.request.body;
    const res = await service.user.create(payload);
    console.log(res);
    ctx.body = {
      msg: '创建成功！'
    }
  }
}

module.exports = UserController;
